Types of diagrams

Trilium supports Mermaid, which adds support for various diagrams such as flowchart, sequence diagram, class diagram, state diagram, pie charts, etc., all using a text description of the chart instead of manually drawing the diagram.

Starting with v0.103.0, Mermaid diagrams no longer start with a sample flowchart, but instead a pane at the bottom will show all the supported diagrams with sample code for each:

Layouts

Depending on the chart being edited and user preference, there are two layouts supported by the Mermaid note type:

It's possible to switch between the two layouts at any time by pressing the icon in the Floating buttons area.

Interaction

Errors in the diagram

If there is an error in the source code, the error will be displayed in an information pane.

During the state of an error, the diagram will no longer be rendered and the previously working diagram will remain in the preview section.